<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: page_view_as.php 135 2013-09-22 07:30:55Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 135 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-22 07:30:55 +0000 (Sun, 22 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright (c) since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	(c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	(c) 2002-2003 osCommerce - www.oscommerce.com
* 	(c) 2003     nextcommerce - www.nextcommerce.org
* 	(c) 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

$page = '';
if(isset($_GET['page']))
	$page = '&page='.$_GET['page'];

switch($listing->listName) {
	case 'list' :
		$views_as = '<a href="'.$listing->setExternalLink.$listing->sep.'view_as=grid'.$page.'">
						<img width="20" height="20" src="images/icons/page_view_gallery.gif" alt="" />
					</a> <img width="20" height="20" src="images/icons/page_view_list_inactive.gif" alt="" /> <a href="'.$listing->setExternalLink.$listing->sep.'view_as=mosaic'.$page.'">
						<img width="20" height="20" src="images/icons/page_view_mosaic.gif" alt="" />
					</a>';
		break;

	case 'mosaic' :
		$views_as = '<a href="'.$listing->setExternalLink.$listing->sep.'view_as=grid'.$page.'">
						<img width="20" height="20" src="images/icons/page_view_gallery.gif" alt="" />
					</a> <a href="'.$listing->setExternalLink.$listing->sep.'view_as=list'.$page.'">
						<img width="20" height="20" src="images/icons/page_view_list.gif" alt="" />
					</a> <img width="20" height="20" src="images/icons/page_view_mosaic_inactive.gif" alt="" />';
		break;

	case 'grid' :
	default :
		$views_as = '<img width="20" height="20" src="images/icons/page_view_gallery_inactive.gif" alt="" /> 
					<a href="'.$listing->setExternalLink.$listing->sep.'view_as=list'.$page.'">
						<img width="20" height="20" src="images/icons/page_view_list.gif" alt="" />
					</a> 
					<a href="'.$listing->setExternalLink.$listing->sep.'view_as=mosaic'.$page.'">
						<img width="20" height="20" src="images/icons/page_view_mosaic.gif" alt="" />
					</a>';
		break;
}

$view = new Smarty;
$view->assign('LINKS_VIEW_AS', $views_as);
$view->assign('language', $_SESSION['language']);
$views = $view->fetch(CURRENT_TEMPLATE.'/module/products_view_as.html');

$module_smarty->assign('PRODUCTS_VIEW_AS', '<li class="page_view_as">'.$views.'</li>');
?>